Platform Explorer / Nuxeo Platform 2021.59

Component org.nuxeo.ecm.platform.rendition.download.contrib

Resolution Order

477
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.rendition.download.contrib">

  <extension target="org.nuxeo.ecm.platform.rendition.service.RenditionService"
    point="defaultRendition">
    <defaultRendition reason="download">
      <script language="JavaScript">
        function run() {
          if (Document.getFacets().contains("Collection")) {
            return 'containerDefaultRendition';
          } else if (Document.getFacets().contains("Folderish")) {
            return 'containerDefaultRendition';
          } else if (Document.hasSchema("file")) {
            return 'mainBlob';
          } else if (Document.getType() == 'Note') {
            return 'pdf';
          } else {
            return 'xmlExport';
          }
        }
      </script>
    </defaultRendition>
  </extension>

</component>